// MP3Tag.h: interface for the CMP3Tag class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MP3TAG_H__61016959_BA41_4DEE_92CA_6780A32C4058__INCLUDED_)
#define AFX_MP3TAG_H__61016959_BA41_4DEE_92CA_6780A32C4058__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "MMediaTag.h"
#include <e32std.h>
#include <e32base.h>

#define TAGID3V1_LENGTH		128
#define TAGID3V1_COUNT		6
#define TAGID3V1_MAXLEN		50

// Forward declear

class CMP3Tag : public MMediaTag  
{
public:
	struct TAG3V1_INFO
	{
		char		iFlag[3];
		char		iTitle[30];
		char		iArtist[30];
		char		iAlbum[30];
		char		iYear[4];
		char		iComment[30];
		char		iGenre[1];
	};

	CMP3Tag();
	virtual ~CMP3Tag();

	virtual TInt GetTagInfo(TInt aIndex, TDes& aName, TDes& aValue);
	virtual TInt GetTagCount();	
	virtual TInt ChangeTagL(RFs& aSession, const CDesCArray& aTagNames, const CDesCArray& aTagValues);

	/*------------------------------------------------------------------
	Function:	ConstructL
	Class:		CMP3Tag
	Parameters:	aSession - file session, aFile - Media file path
	Return:			
	Descript:	Construct a MP3 Tag object
	Author:		ma811
	Date:		2007-11-17
	------------------------------------------------------------------*/
	virtual void ConstructL(RFs& aSession, TFileName& aFile);

protected:
	void _PrintTags();

	TInt _GetPosByIndex(const TDesC& aName);
	//CDesCArray	*iTagNames;
	//CDesCArray	*iTagValues;

	//CArrayVarFlat<TDesC>*	iTagNames;
	//CArrayVarFlat<TDesC>*	iTagValues;
	TBuf<31>	iTitle;
	TBuf<31>	iArtist;
	TBuf<31>	iAlbum;
	TBuf<5>		iYear;
	TBuf<31>	iComment;
	TBuf<2>		iGenre;
};

#endif // !defined(AFX_MP3TAG_H__61016959_BA41_4DEE_92CA_6780A32C4058__INCLUDED_)
